public class minOperations {
    public static void main(String[] args) {
        Solution solution = new Solution();
        System.out.println(solution.minOperations(new int[]{1, 1, 4, 2, 3}, 5));
    }
}
